<template>
   <van-nav-bar :title="title" left-text="返回" left-arrow @click-left="onClickLeft" @click-right="onClickRight" />
</template>
<script>
export default {
  props: ['title', 'back-url'],
  methods: {
    onClickLeft() {
      if (this.backUrl == undefined) {
        this.$router.back()
      } else {
        this.$router.push({
          path: this.backUrl
        })
      }
    },
    onClickRight() {
      console.log('分享');
    }
  }
}
</script>
<style lang="scss">
</style>
